package com.strongdigit.ioc.aware;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class MoocApplicationContext implements ApplicationContextAware {

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {


        MoocApplicationContext bean=   (MoocApplicationContext)applicationContext.getBean("moocApplicationContext");
        System.out.println("setApplicationContext方法中："+bean.hashCode());
    }
}
